#ifndef __ULAW_CODEC_H__
#define __ULAW_CODEC_H__ 1

#include "codec.h"

class CUlawCodec : public ICodec
{
public:
	CUlawCodec();
	virtual ~CUlawCodec();

	virtual NAudioFormats::ECodec getCodecType();

	virtual double convertFromS8ToDouble(int8_t pSample);
	virtual int8_t convertFromDoubleToS8(double pSample);

	virtual double convertFromU8ToDouble(uint8_t pSample);
	virtual uint8_t convertFromDoubleToU8(double pSample);

	virtual double convertFromS16ToDouble(int16_t pSample);
	virtual int16_t convertFromDoubleToS16(double pSample);

	virtual double convertFromU16ToDouble(uint16_t pSample);
	virtual uint16_t convertFromDoubleToU16(double pSample);
private:
	static unsigned char mExponentTable[256];

	CUlawCodec(const CUlawCodec& );
	CUlawCodec& operator=(const CUlawCodec& );
};

#endif
